<template>
	<view class="container">
		<uni-card>
			<image :src="baseUrl+item.pic" style="width: 100%;height: 150px;" mode=""></image>
			<view class="item" style="color: #252525;font-size: 15px;">{{item.sourceName}}</view>
			<view class="item" style="">建筑面积：
				<text style="color: red;font-size: 16px;">{{item.areaSize}}平方米</text>
			</view>
			<view class="item" style="">房源单价：<text style="color: red;font-size: 16px;">{{item.price}}</text></view>
			<view class="item" style="">房源类型：<text style="color: red;font-size: 16px;">{{item.houseType}}</text></view>
			<view class="item" style="color: #252525;
				">
				<view class="" v-html="item.description"></view>
			</view>
		</uni-card>
		<view class="" style="display: flex;justify-content: space-between;margin-top: 20px;">
			<view class="" style="width: 49%;">
				<button type="default" @click="back" style="">主页</button>
			</view>
			<view class="" style="width: 49%;">
				<button type="primary" @click="call" style="">打电话</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				item: {}
			};
		},
		onLoad(item) {
			this.get('/prod-api/api/house/housing/' + item.id, {

			}, ).then(res => {
				let data = res.data
				this.item = data
			})
		},
		onReady() {

		},
		onShow() {

		},
		methods: {
			back() {
				uni.navigateBack({
					delta: 1
				});
			},
			call() {
				uni.makePhoneCall({
					phoneNumber: this.item.tel
				})
			}
		}
	};
</script>

<style lang="scss">
	page {
		background-color: white;
	}
</style>
